#include "StyleLexers.h"

// ----------------------------------------------------------------------------

KEYWORDLIST KeyWords_AVS =
{   // --- keywords ---
    "catch current_frame else error_msg false for function global if last return true try " // keywords
    "clip int float string bool val func bool_array int_array string_array float_array clip_array func_array", // datatypes
    // --- filters ---
    "addborders alignedsplice amplify amplifydb animate applyrange assumebff assumefieldbased assumefps "
    "assumeframebased assumesamplerate assumescaledfps assumetff audiodub audiodubex audiotrim avifilesource avifilesource "
    "avisource avisource bicubicresize bilinearresize blackmanresize blackness blankclip blur bob cache changefps "
    "colorbars colorbarshd colorkeymask coloryuv compare complementparity conditionalfilter conditionalreader "
    "conditionalselect convertaudio convertaudioto16bit convertaudioto24bit convertaudioto32bit "
    "convertaudioto8bit convertaudiotofloat convertbacktoyuy2 convertbits convertfps convertfromdoublewidth "
    "convertfromstacked converttobackyuy2 converttodoublewidth converttomono converttoplanarrgb converttorgb "
    "converttorgb24 converttorgb32 converttorgb48 converttorgb64 converttostacked converttoy8 converttoyuv420 "
    "converttoyuv422 converttoyuv444 converttoyuy2 converttoyv12 converttoyv16 converttoyv24 converttoyv411 "
    "crop cropbottom delayaudio deleteframe dissolve doubleweave duplicateframe echo ensurevbrmp3sync extracta "
    "extractb extractg extractr extractu extractv extracty fadein fadein0 fadein2 fadeio fadeio0 fadeio2 "
    "fadeout fadeout0 fadeout2 fixbrokenchromaupsampling fixluminance fliphorizontal flipvertical frameevaluate "
    "freezeframe gaussresize generalconvolution getchannel getchannels getleftchannel getrightchannel grayscale "
    "greyscale histogram horizontalreduceby2 imagereader imagesource imagesourceanim imagewriter info "
    "interleave internalcache invert killaudio killvideo lanczos4resize lanczosresize layer letterbox levels "
    "limiter loop mask maskhs merge mergeargb mergechannels mergechroma mergeluma mergergb messageclip mixaudio "
    "monotostereo normalize null opendmlsource overlay peculiarblend planetoy pointresize preroll pulldown "
    "reduceby2 resampleaudio resetmask reverse rgbadjust scriptclip segmentedavisource segmentedavisource "
    "segmenteddirectshowsource selecteven selectevery selectodd selectrangeevery separatecolumns separatefields "
    "separaterows sharpen showalpha showblue showfiveversions showframenumber showgreen showred showsmpte "
    "showtime sincresize skewrows spatialsoften spline16resize spline36resize spline64resize ssrc "
    "stackhorizontal stackvertical subtitle subtract supereq swapfields swapuv temporalsoften timestretch tone "
    "trim turn180 turnleft turnright tweak unalignedsplice utoy utoy8 version verticalreduceby2 vtoy vtoy8 "
    "wavsource weave weavecolumns weaverows writefile writefileend writefileif writefilestart ytouv",
    // --- plugins ---
    "ablur addgrain addgrainc analyzelogo apparentfps asharp asobel assrender autoadjust autocrop autolevels "
    "average avstp_set_threads avxframecapture avxsubtitle awarp awarp4 awarpsharp awarpsharp2 backwardclense "
    "barrel bicubicresize bicubicresizemt bifrost bilinearresize bilinearresizemt blackmanresizemt blindpp "
    "bm3d_cpu bm3d_cuda bm3d_vaggregate bokeh butteraugli bwdif callcmd cas cfielddiff cframediff checkmate "
    "circles clense clipblend clipboard_clear clipboard_getdib clipboard_getlasterror "
    "clipboard_getlasterrorstring clipboard_gettext clipboard_puttext clipclop cnr2 colormatrix colourwarp "
    "combmask2 conditionalfilter continuityfixer convertfromshader convertlinearrgbtoyuv "
    "convertlinearrgbtoyuv_bt2446_a_hdrtosdr convertrgb_aces_hdrtosdr convertrgb_hable_hdrtosdr "
    "convertrgb_mobius_hdrtosdr convertrgb_reinhard_hdrtosdr convertrgbtoxyz converttoshader "
    "convertxyz_aces_hdrtosdr convertxyz_hable_hdrtosdr convertxyz_mobius_hdrtosdr "
    "convertxyz_reinhard_hdrtosdr convertxyz_scale_hdrtosdr convertxyz_scale_sdrtohdr convertxyztorgb "
    "convertxyztoyuv convertyuvtolinearrgb convertyuvtoxyz converxyz_bt2446_c_hdrtosdr convolution3d "
    "convolution3dyv12 coronasequence cube dctfilter dctfilterd deband_f3kdb deband_f3kdb_dither "
    "debicubicresizemt debilinearresizemt deblackmanresizemt deblendlogo deblock decimate decomb decross "
    "dedot dedup deen defish defreq degaussresizemt degrainmedian dejitter delanczos4resizemt "
    "delanczosresizemt depan depanestimate depaninterleave depanscenes depanstabilize deshaker3d "
    "desinclin2resizemt desincresizemt desinsqrresizemt despline16resizemt despline36resizemt "
    "despline64resizemt despot deuserdefined2resizemt dfttest dgbob dgcube dgdecimate dgdenoise dghdrtosdr "
    "dgsharpen dgsource dgtelecide directshowsource distancefunction dither_add16 dither_bilateral16 "
    "dither_box_filter16 dither_limit_dif16 dither_max_dif16 dither_median16 dither_merge16 dither_out "
    "dither_removegrain16 dither_repair16 dither_sub16 ditherpost dotkills dotkillt dotkillz dpid dss2 dup "
    "dupmc edeen eedi2 eedi3 eedi3_rpow2 exblend extractplane f1qtest f1quiver f2qblur f2qbokeh "
    "f2qcorrelation f2qlimit f2qsharp f2qtest f2quiver f3kdb faerydust fan fcbi feedbackinput feedbackoutput "
    "ffaudiosource ffconverttorgb24 ffconverttorgb32 ffconverttoyuy2 ffconverttoyv12 ffdeinterlace "
    "ffgetloglevel ffgetversion ffimagesource ffindex ffms2 ffpp ffsetloglevel fft3dfilter fft3dgpu "
    "ffvideosource fielddeinterlace fielddiff fillborders fillmargins fisheye fluxsmooth fluxsmoothst "
    "fluxsmootht fmtc_bitdepth fmtc_convert fmtc_matrix fmtc_matrix2020cl fmtc_primaries fmtc_resample "
    "fmtc_transfer forceprocess forwardclense framediff frameevaluate framenumber framerepeat framesel "
    "framestore fredaverage frfun7 gammatch gaussresizemt gblur gicocu golddust gradfun2db grid grtconfig "
    "hbvfwsource hdragc hqdn3d imagesource inpaintlogo iscombed iscombed2 iscombedtivtc jinc144resize "
    "jinc256resize jinc36resize jinc64resize jincresize jitter kerneldeint knlmeanscl lanczos4resize "
    "lanczos4resizemt lanczosresize lanczosresizemt leakkernelbob leakkerneldeint libplacebo_deband "
    "libplacebo_resample libplacebo_shader libplacebo_tonemap lsmashaudiosource lsmashvideosource lumayv12 "
    "lwlibavaudiosource lwlibavvideosource manalyse maskedmerge2 mblockfps mblur mcompensate mdegrain1 "
    "mdegrain2 mdegrain3 mdegrain4 mdegrain5 mdegrain6 mdegrainn mdepan mean median medianblur "
    "medianblurtemporal mergehints mflow mflowblur mflowfps mflowinter minvar mipsmooth mmask morph "
    "mosquitonr mp_pipeline mpeg2source mrecalculate mrestorevect mscalevect mscdetection msharpen mshow "
    "msmooth msrcp msrcr mstorevect msuper mt_adddiff mt_average mt_binarize mt_circle mt_clamp "
    "mt_convolution mt_deflate mt_diamond mt_edge mt_ellipse mt_expand mt_freeellipse mt_freelosange "
    "mt_freerectangle mt_hysteresis mt_infix mt_inflate mt_inpand mt_invert mt_logic mt_losange mt_lut "
    "mt_lutf mt_luts mt_lutspa mt_lutsx mt_lutxy mt_lutxyz mt_makediff mt_mappedblur mt_merge mt_motion "
    "mt_polish mt_rectangle mt_square multidecimate neo_dfttest neo_f3kdb neo_fft3d neo_tmedian neo_vd neural "
    "nnedi3 nnedi3_rpow2 nnedi3cl packedtoplanar packedtorgb32 pattern pixiedust pointresize pointresizemt "
    "prune pvbob qcombed randomsource rawreader rawsequence rawwriter reduceflicker referencefixerfixer "
    "reform removegrain repair requestlinear rgbadapt rgbamplifier rgbtorgb rife robocrop rotate saltpepper "
    "sangnom sangnom2 sbr sbrv scriptclip scselect_hbd (script) segamp shader shaderexecute showchannels "
    "showcombedtivtc sinclin2resizemt sincresizemt sinpowresizemt smoothcurve smoothcurve16 smoothcustom "
    "smoothcustom16 smoothgrad smoothlevels smoothlevels16 smoothtools smoothtools16 smoothtweak "
    "smoothtweak16 spacedust spline16resize spline16resizemt spline36resize spline36resizemt spline64resize "
    "spline64resizemt ssim ssiq stepfilter subtitleex swscale tbilateral tcolormask tcomb tdecimate tdeint "
    "telecide temporalcleaner temporalrepair tfm tfmpp tisophote tmaskcleaner tnlmeans tomsmocomp toon "
    "ttempsmooth ttempsmoothf tunsharp turn tweakhist undot unfilter unsharp unsharpmask userdefined2resizemt "
    "vaguedenoiser veed verticalcleaner videoscope vinverse vinverse2 vmaf vscnr2 vsdeblockpp7 "
    "vsdegrainmedian vseval vsimport vslghost vsmsharpen vsmsmooth vstbilateral vstcanny vstedgemask vstmm "
    "vsttempsmooth w2xncnnvk waveform yadifmod2",
    // --- functions ---
    "abs acos apply arrayadd arraydel arrayins arrayset arraysize asin assert atan atan2 averageb "
    "averagechromau averagechromav averageg averageluma averager bdifference bdifferencefromprevious "
    "bdifferencetonext bitand bitchange bitchg bitclear bitclr bitlrotate bitlshift bitlshifta bitlshiftl "
    "bitlshifts bitlshiftu bitnot bitor bitrol bitror bitrrotate bitrshifta bitrshiftl bitrshifts bitrshiftu "
    "bitsal bitsar bitset bitsetcount bitshl bitshr bittest bittst bitxor bplanemax bplanemedian bplanemin "
    "bplaneminmaxdifference buildpixeltype ceil chr chromaudifference chromavdifference "
    "colorspacenametopixeltype continueddenominator continuednumerator cos cosh default defined distributor "
    "dumpfiltergraph eval exist exp fillstr findstr float floor fmod format frac functionexists gdifference "
    "gdifferencefromprevious gdifferencetonext getmtmode getprocessinfo gplanemax gplanemedian gplanemin "
    "gplaneminmaxdifference hex hexvalue import int internalfunctionexists isbool isclip isfloat isint isstring "
    "isversionorgreater lcase leftstr load_stdcall_plugin loadcplugin loadplugin loadvfapiplugin "
    "loadvirtualdubplugin log log10 logmsg lumadifference max midstr min muldiv nop oncpu oncuda "
    "opt_allowfloataudio opt_avipadscanlines opt_avipadscanlines opt_dwchannelmask opt_enable_b64a opt_enable_planartopackedrgb "
    "opt_enable_v210 opt_enable_y3_10_10 opt_enable_y3_10_16 opt_usewaveextensible opt_vdubplanarhack ord pi "
    "planeminmaxstats pow prefetch propclearall propcopy propdelete propgetall propgetany propgetasarray "
    "propgetclip propgetdatasize propgetfloat propgetint propgetkeybyindex propgetstring propgettype "
    "propnumelements propnumkeys propset propsetarray propsetclip propsetfloat propsetint propsetstring "
    "propshow rand rdifference rdifferencefromprevious rdifferencetonext revstr rgbdifference "
    "rgbdifferencefromprevious rgbdifferencetonext rightstr round rplanemax rplanemedian rplanemin "
    "rplaneminmaxdifference scriptdir scriptdirutf8 scriptfile scriptfileutf8 scriptname scriptnameutf8 select "
    "setcachemode setgraphanalysis setlogparams setmaxcpu setmemorymax setmtmode setplanarlegacyalignment "
    "setworkingdir sign sin sinh spline sqrt strcmp strcmpi strfromutf8 string strlen strtoutf8 tan tanh time "
    "trimall trimleft trimright ucase udifferencefromprevious udifferencetonext undefined uplanemax "
    "uplanemedian uplanemin uplaneminmaxdifference value varexist vdifferencefromprevious vdifferencetonext "
    "versionnumber versionstring vplanemax vplanemedian vplanemin vplaneminmaxdifference "
    "ydifferencefromprevious ydifferencetonext yplanemax yplanemedian yplanemin yplaneminmaxdifference",
    // --- clipproperties ---
    "audiobits audiochannels audioduration audiolength audiolengthf audiolengthhi audiolengthlo audiolengths "
    "audiorate bitspercomponent componentsize framecount framerate frameratedenominator frameratenumerator "
    "getparity hasalpha hasaudio hasvideo height is420 is422 is444 isaudiofloat isaudioint isfieldbased "
    "isframebased isinterleaved ispackedrgb isplanar isplanarrgb isplanarrgba isrgb isrgb24 isrgb32 isrgb48 "
    "isrgb64 isy isy8 isyuv isyuva isyuy2 isyv12 isyv16 isyv24 isyv411 numcomponents pixeltype width",
    // --- userdefined ---
    "_iqa_downsample aa aaa aaf acescct_f acescct_r adaptive_sharpen adaptivegrain addbordersmod animeivtc "
    "animemask2 antialiasing arrayappend arraydelval arrayeval arrayinv arrayiqm arraymedian arrayop "
    "arrayprint arraysym arrayzip astdr autoresize avsplusversionnumber balanceborders bbmod blah "
    "blendsubimage boxmask broadcast bssim bt2390_pq build_sigmoid_expr camembert_dhh camembert_dhhmod casm "
    "casp cat ccd cctf chreatwhite chroma_placement chroma_rep chroma_rep2 chromashiftsp2 chromaticity_xy "
    "chubbyrain2 chubbyrain3 clamp clipcomp clipstats cmf color_coef color_fuzzy_search color_propget "
    "colortohex comparisongen comptest contrasharpening convert_fields_scan_order convertformat cornermask cr "
    "createrect cropresize cross csmod daa daa3 darkpreserve_function dcpp_preset debandmask deblock_qed "
    "deep_resize dehalo_alpha delicatesharp destripeh destripev detailsharpen dgsharpen2 display_referred "
    "display_sim dither_add_grain16 dither_addborders16 dither_convert_8_to_16 dither_convert_rgb_to_yuv "
    "dither_convert_yuv_to_rgb dither_convey_rgb48_on_yv12 dither_crop16 dither_gen_null_lsb dither_get_lsb "
    "dither_get_msb dither_luma_rebuild dither_lut16 dither_lut8 dither_lutxy8 dither_lutxyz8 "
    "dither_merge16_8 dither_quantize dither_resize16nr dither_sigmoid_direct dither_sigmoid_inverse "
    "dither_srgb_display dither_y_gamma_to_linear dither_y_linear_to_gamma dither_yuy2tointerleaved "
    "dither_yuy2tointerleaved16 dither_yuy2toplanar dither_yuy2toplanar16 dither1pre dither2pre "
    "ditherbuildmask dithertestpatterns dividestr dldet dot dotclip dotclipa dotcrawlplusplus drawrect "
    "edgecleaner ediaa eedi2 eedi3 emask_dhh eotf_1886a eotf_2084 eotf_apple eotf_chrome eotfi_1886a "
    "eotfi_2084 eotfi_apple eotfi_chrome ex_adddiff ex_anguidedblur ex_athres ex_autolevels ex_bilateral "
    "ex_binarize ex_blend ex_blur ex_blur3d ex_bm3d ex_bob ex_boxblur ex_bs ex_clamp ex_contrasharpening "
    "ex_contrast ex_deflate ex_dgdenoise ex_dlut ex_edge ex_expand ex_fluxsmoothst ex_fluxsmootht "
    "ex_gaussianblur ex_glow ex_guidedblur ex_highlighter ex_highlightermod ex_highlightlimiter "
    "ex_highlightlimitermod ex_hitormiss ex_inflate ex_inpand ex_interpolatedoubles ex_invert ex_kawase "
    "ex_knlmeanscl ex_levels ex_lfr ex_limitchange ex_limitdif ex_logic ex_luma_rebuild ex_lut ex_luts "
    "ex_lutspa ex_lutxy ex_lutxyz ex_lutxyza ex_makeadddiff ex_makediff ex_median ex_merge ex_mfr ex_minblur "
    "ex_motion ex_posterize ex_reduceflicker ex_repair ex_retinex ex_sbr ex_shape ex_smartblur ex_smooth "
    "ex_unsharp ex_uvexpr ex_vibrance ex_vinverse ex_yexpr extractclip f3kpf fastlinedarken fastlinedarkenmod "
    "ffformattime ffinfo ffmpegsource2 filldrops fillmissing findstrinstance findtemp finedehalo finesharp "
    "finesharpplus fixcbr fixcbr_ fixchromableedingmod fixcolumnbrightnessprotect2 fixer fixjumps fixrbr "
    "fixrbr_ fixrowbrightnessprotect2 flatmask format_fuzzy_search framerateconverter framerateconverterex "
    "framerateconvertermix frostyborders fsrresize full_scale gamutwarning gmsd gradfun2dbmod gradfun3 "
    "gradfun3dbmod gradfun3plus gradfunkmirror gradientlinear grainevaluate grainfactory3 grainfactory3mod "
    "grainfl grainstabilize grayworld greycenteredtomask_dhh greyscale_rgb greyworld highlighter "
    "highlightermod highlightlimiter highlightlimitermod histocurve hqderingmod hqdn3d_2 hsv_to_rgb hsvxhsv "
    "hybridfupp ictcp_to_rgb imageborders inpaintdelogo interframe interlaced60or50 interpolatedoubles "
    "ipt_to_rgb isavsneo isavsplus isruntime laa lab_to_xyz lfdeband lightpreserve_function limitedsharpen "
    "limitedsharpen2 limitedsharpenfaster lindasharp linear_and_gamma lineartransformation lms_to_xyz lmt_dcp "
    "lmt_emor lmti_dcp lmti_emor logo lremovedust lremovedustsse3 lsfmod lsfplus lsharpaaf lumamask "
    "lutdecrawl lutderainbow luv_to_xyz lwlinfo m4_sh maa matchclip matrixclip matrixdot matrixinvert "
    "matrixtranspose mattecrop mcaa mcbob mcdegrainsharp mclean mcremovedust mctd mctemporaldenoise mdsi "
    "mediansharp medsharp minblur mmod moncurve_coef moncurve_f moncurve_r motionmask mrdaa msky_to_yyy "
    "mt_expand_multi mt_inpand_multi multisharpen2 mvbob naa naa3mod nediaa nmod nnedi nnedi2 nnedi3 "
    "nnedi3_resize16 nnedi3resize nnedi3wrap nnedi3x_rpow2 nonlinusm nonyuy2clipin nonyuy2clipout "
    "notsmdegrain nvsharpen offset_video oklab_to_rgb ootf opp_to_rgb opticalflowrife overlayplus padborders "
    "padresize pixel_parser plum_basic plum_final plum_super pseudocolor psharpen qtgmc qtgmcp raa "
    "rainbow_smooth2 ratioresize ravuresize rawreadinterleaved rawreadplanar rawwriteinterleaved "
    "rawwriteplanar readstats readv210 readv210stack16 reblend recon refadein refadeout regularsharp "
    "removedirt resize8 resizeinternal resizeshader resizex retinex_edgemask rgb_to_hsv rgb_to_ictcp "
    "rgb_to_ipt rgb_to_oklab rgb_to_opp rgb_to_xyz rgb_to_yccbccrc rgb_to_ycocg rgb_to_ycocgr rgb_to_yuv "
    "rgb_to_yuvr roundhalftoeven roundhalftoeven_mod rsharpen saa sangnom santiag santiagmod saveragelumamask "
    "sblackerpixel sbr_avsi sbrh sbrv_avsi scenestats schromashift2 scurve3 seesaw seesawmulti "
    "seethedifference separateresize sh_bob sh_getcsp sh_getuserglobalimt sh_getuserglobalimtbool "
    "sh_getuserglobalimtint sh_knlmeanscl sh_limitchange sh_padding sh_removegrain sh_sharpen2 sh_soothess "
    "sh_strreplace sh_vinverse2 sh_vinverse2h sh_y8_yv411 shaarp sharpaamcmod sharpencomplex2 sigmoid_direct "
    "sigmoid_inverse skin_qualifier slimit_dif slimit_dif2 slinesm slopebend smam smam_mask smartfade "
    "smartfademod smdegrain sminideen smoothcurvec3 smpte_legal sneo_dfttest sneo_fft3d softlimiter "
    "solarcurve soothe spasses spasses2 spd_d splinaa spline36resizemod spotless spresso srestore srgauss "
    "ssim_downsample sspasses sssharp sssharpfaster stab stgmc sttwm supaa superres superrespass superresxbr "
    "superxbr superxbrmulti svm svsmsharpen svstbilateral svstcanny svsttempsmooth svsttempsmoothf "
    "swhiterpixel swlinesm t_3colormask t_linemask taa taambk tempgaussmc_beta2 temporaldegrain2 tm_2446c "
    "tmm2_ortmm1 tonemapper unsharpmask_avsi unsharpmask_hbd vinversed vmtoon vsssim waifu2xresize whitepoint "
    "xsharpenplus xyb_to_xyz xyz_to_lab xyz_to_lms xyz_to_luv xyz_to_rgb xyz_to_xyb xyz_to_ydzdx xyz_to_yxy "
    "y_gamma_to_linear y_linear_to_gamma yadifmodclipin yadifmodclipout yahr yahr2 yahr3 yahrr "
    "yccbccrc_to_rgb ycocg_to_rgb ycocgr_to_rgb ydzdx_to_xyz yuv_to_rgb yuvr_to_rgb yxy_to_xyz",
    NULL,
};


EDITLEXER lexAVS =
{
    SCLEX_AVS, "avs", IDS_LEX_AVI_SYNTH, L"AviSynth Script", L"avs; avsi", L"",
    &KeyWords_AVS, {
        { {STYLE_DEFAULT}, IDS_LEX_STR_Default, L"Default", L"", L"" },
        //{ {SCE_AVS_DEFAULT}, IDS_LEX_STR_Default, L"Default", L"", L"" },
        { {MULTI_STYLE(SCE_AVS_COMMENTLINE,SCE_AVS_COMMENTBLOCK,SCE_AVS_COMMENTBLOCKN,0)}, IDS_LEX_STR_Comment, L"Comment", L"fore:#008000", L"" },
        { {SCE_AVS_OPERATOR}, IDS_LEX_STR_Operator, L"Operator", L"fore:#7F007F", L"" },
        { {MULTI_STYLE(SCE_AVS_STRING,SCE_AVS_TRIPLESTRING,0,0)}, IDS_LEX_STR_String, L"String", L"fore:#7B7B3E", L"" },
        { {SCE_AVS_NUMBER}, IDS_LEX_STR_Number, L"Number", L"fore:#007F7F", L"" },
        { {SCE_AVS_KEYWORD}, IDS_LEX_STR_Keyword, L"Keyword", L"bold; fore:#3737FF", L"" },
        { {SCE_AVS_IDENTIFIER}, IDS_LEX_STR_Identifier, L"Identifier", L"bold; fore:#6E6E6E", L"" },
        { {SCE_AVS_FILTER}, IDS_LEX_STR_Filter, L"Filter", L"bold; fore:#3C3CFF", L"" },
        { {SCE_AVS_PLUGIN}, IDS_LEX_STR_Plugin, L"Plugin", L"bold; fore:#FF8040", L"" },
        { {SCE_AVS_FUNCTION}, IDS_LEX_STR_63277, L"Function", L"fore:#9224FF", L"" },
        { {SCE_AVS_CLIPPROP}, IDS_LEX_STR_63316, L"Clip Property", L"fore:#C4C400", L"" },
        { {SCE_AVS_USERDFN}, IDS_LEX_STR_63305, L"User Defined Function", L"fore:#8000FF", L"" },
        EDITLEXER_SENTINEL
    }
};
